package com.xxx.blog.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Tb Article Type表
 *
 * @TableName tb_article_type
 */
@Data
public class ArticleType implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("文章类型名称")
    private String typeName;

    @ApiModelProperty("状态(0:不可用;1:可用)")
    private Integer status;

    @ApiModelProperty("添加时间")
    private Date createTime = new Date();

    @ApiModelProperty("修改时间")
    private Date updateTime = new Date();

    @ApiModelProperty("上级Id")
    private Long parentId;

    @ApiModelProperty("父类型对象")
    private ArticleType parent;

    @ApiModelProperty("文章类型子集合")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//返回json忽略为空的字段
    private List<ArticleType> children = new ArrayList<>();

}